import dayjs from 'dayjs'
import { createContext } from 'react'
import { systemInfo } from './interface'

export const defaultHomeData = {
	/* 版本名称 */
	version: '',
	/**系统名称 */
	systemName: '科达视频会议管理系统',
	/**版权方 */
	copyrightOwner: '苏州科达科技股份有限公司',
	/**版权期限 */
	copyrightDate: '1995-' + dayjs().format('YYYY'),
	/**网址文字 */
	addressText: 'www.kedacom.com',
	/**网址地址 */
	addressHref: 'http://www.kedacom.com',
	/**公司英文 */
	companyDomainName: 'KEDACOM',
}

export interface HomeWelcomeContextProps {
	homeWelcomeData: systemInfo
	setHomeWelcomeData: Function
}
export const HomeWelcomeContext = createContext<HomeWelcomeContextProps>({
	homeWelcomeData: defaultHomeData,
	setHomeWelcomeData: () => {},
})
